﻿using Abp.Domain.Entities;
using Microsoft.EntityFrameworkCore;
using SOEI.Solution.DomainEntities.ContractManagement;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;

namespace SOEI.Solution.DomainEntities.RegulatoryMange
{
    [Table("CLFZJJG_JGXYXX")]
    public class Agreement : Entity<string>
    {
        /// <summary>监管协议编号
        /// </summary>
        [Column("JGXYBH")]
        public override string Id { get => base.Id; set => base.Id = value; }

        /// <summary>监管协议号
        /// </summary>
        [Column("JGXYH")]
        public string JGXYH { get; set; }

        /// <summary>合同登记号
        /// </summary>
        [Column("HTDJH")]
        public string HTDJH { get; set; }

        /// <summary>产权证号
        /// </summary>
        [Column("CQZH")]
        public string CQZH { get; set; }

        /// <summary>监管账户代码
        /// </summary>
        [Column("JGZHDM")]
        public string JGZHDM { get; set; }

        /// <summary>成交价格
        /// </summary>
        [Column("FWZJ")]
        public decimal? FWZJ { get; set; }

        /// <summary>监管金额
        /// </summary>
        [Column("JGJE")]
        public decimal? JGJE { get; set; }

        /// <summary>监管协议状态
        /// </summary>
        [Column("JGXYZTDM")]
        public string JGXYZTDM { get; set; }

        /// <summary>录入时间
        /// </summary>
        [Column("LRSJ")]
        public DateTime? LRSJ { get; set; }

        /// <summary>监管类型代码
        /// </summary>
        [Column("JGLXDM")]
        public string JGLXDM { get; set; }

        /// <summary>一次性付款期限
        /// </summary>
        [Column("YCXFKQX")]
        public string YCXFKQX { get; set; }

        /// <summary>一次性付款金额
        /// </summary>
        [Column("YCXFKJE")]
        public decimal? YCXFKJE { get; set; }

        /// <summary>按揭付款期限
        /// </summary>
        [Column("AJFKQX")]
        public string AJFKQX { get; set; }

        /// <summary>按揭首付金额
        /// </summary>
        [Column("AJSFJE")]
        public decimal? AJSFJE { get; set; }

        /// <summary>甲方结算账户开户银行
        /// </summary>
        [Column("JFJSZHKHYH")]
        public string JFJSZHKHYH { get; set; }

        /// <summary>甲方结算账户名称
        /// </summary>
        [Column("JFJSZHMC")]
        public string JFJSZHMC { get; set; }

        /// <summary>甲方结算账户账号
        /// </summary>
        [Column("JFJSZHZH")]
        public string JFJSZHZH { get; set; }

        /// <summary>甲方证件号码
        /// </summary>
        [Column("JFZJHM")]
        public string JFZJHM { get; set; }

        /// <summary>乙方结算账户开户银行
        /// </summary>
        [Column("YFJSZHKHYH")]
        public string YFJSZHKHYH { get; set; }

        /// <summary>乙方结算账户名称
        /// </summary>
        [Column("YFJSZHMC")]
        public string YFJSZHMC { get; set; }

        /// <summary>乙方结算账户账号
        /// </summary>
        [Column("YFJSZHZH")]
        public string YFJSZHZH { get; set; }

        /// <summary>乙方代理人身份证明号码
        /// </summary>
        [Column("YFZJHM")]
        public string YFZJHM { get; set; }

        /// <summary>其他事项
        /// </summary>
        [Column("QTSX")]
        public string QTSX { get; set; }

        /// <summary>录入人编号
        /// </summary>
        [Column("LRRBH")]
        public string LRRBH { get; set; }

        /// <summary>录入人姓名
        /// </summary>
        [Column("LRRXM")]
        public string LRRXM { get; set; }

        /// <summary>案件办理状态
        /// </summary>
        [Column("AJBLZT")]
        public string AJBLZT { get; set; }

        /// <summary>机构编号
        /// </summary>
        [Column("JGBH")]
        public string JGBH { get; set; }

        /// <summary>甲方结算账户方式
        /// </summary>
        [Column("JFJSZHFS")]
        public string JFJSZHFS { get; set; }

        /// <summary>乙方账户结算方式
        /// </summary>
        [Column("YFJSZHFS")]
        public string YFJSZHFS { get; set; }

        /// <summary>乙方贷款银行
        /// </summary>
        [Column("YFDKYH")]
        public string YFDKYH { get; set; }

        /// <summary>有效日期
        /// </summary>
        [Column("YXRQ")]
        public DateTime? YXRQ { get; set; }

        /// <summary>非监管原因
        /// </summary>
        [Column("FJGYY")]
        public string FJGYY { get; set; }

        /// <summary>区代码
        /// </summary>
        [Column("QDM")]
        public string QDM { get; set; }

        /// <summary>区域代码
        /// </summary>
        [Column("QYDM")]
        public string QYDM { get; set; }

        /// <summary>区域名称
        /// </summary>
        [Column("QYMC")]
        public string QYMC { get; set; }

        /// <summary>房屋坐落信息
        /// </summary>
        [Column("FWZLXX")]
        public string FWZLXX { get; set; }

        /// <summary>建筑面积
        /// </summary>
        [Column("JZMJ")]
        public decimal? JZMJ { get; set; }

        /// <summary>规划用途
        /// </summary>
        [Column("GHYT")]
        public string GHYT { get; set; }

        /// <summary>合同签订日期
        /// </summary>
        [Column("HTQDRQ")]
        public string HTQDRQ { get; set; }

        /// <summary>合同登记号ID
        /// </summary>
        [Column("HTDJHID")]
        public string HTDJHID { get; set; }

        /// <summary>坐落所在区
        /// </summary>
        [Column("ZLSZQ")]
        public string ZLSZQ { get; set; }

        /// <summary>监管证明出具标志（0未出具；1已出具）
        /// </summary>
        [Column("JGZMCJBZ")]
        public string JGZMCJBZ { get; set; }

        /// <summary>监管证明出具时间
        /// </summary>
        [Column("JGZMCJSJ")]
        public DateTime? JGZMCJSJ { get; set; }

        /// <summary>是否新模式数据（1是；0否）
        /// </summary>
        [Column("SFXMS")]
        public string SFXMS { get; set; }

        /// <summary>是否经纪机构提交（1是；0否）
        /// </summary>
        [Column("ISJJJGTJ")]
        public string ISJJJGTJ { get; set; }

        /// <summary>出卖人
        /// </summary>
        [Column("CMR")]
        public string CMR { get; set; }

        /// <summary>买受人
        /// </summary>
        [Column("MSR")]
        public string MSR { get; set; }

        /// <summary>出卖人证件号码
        /// </summary>
        [Column("CMRZJHM")]
        public string CMRZJHM { get; set; }

        /// <summary>买受人证件号码
        /// </summary>
        [Column("MSRZJHM")]
        public string MSRZJHM { get; set; }

        /// <summary>出卖人联系电话
        /// </summary>
        [Column("CMRLXDH")]
        public string CMRLXDH { get; set; }

        /// <summary>买受人联系电话
        /// </summary>
        [Column("MSRLXDH")]
        public string MSRLXDH { get; set; }

        /// <summary>PDF编号
        /// </summary>
        [Column("PDFID")]
        public string PDFID { get; set; }

        /// <summary>PDF是否需要更新（1需要，0不需要）
        /// </summary>
        [Column("PDFGX")]
        public string PDFGX { get; set; }

        /// <summary>协议状态
        /// </summary>
        [NotMapped]
        public AgreementState agreementState { get; set; }

        /// <summary>合同摘要
        /// </summary>
        [NotMapped]
        public ContractSummary contractSummary { get; set; }

        /// <summary>监管账户
        /// </summary>
        [NotMapped]
        public RegulatoryAccount regulatoryAccount { get; set; }

        /// <summary>协议双方
        /// </summary>
        [NotMapped]
        public ICollection<AgreementBoth> agreementBoths { get; set; }

    }
}
